02. Exercise 1: Calculating Log Returns
Objective: Calculate the raw profit and log returns for a given set of stock prices, and demonstrate the additive and symmetric properties of these.
Instructions: Assume you have the following daily closing prices of a stock over a week: [100, 105, 103, 107, 106].
Calculate the raw profit, raw returns, and log returns for each day relative to the previous day.
- Formula for Raw Profit:
sell_price - buy_price - Formula for Raw Returns:
sell_price / buy_price - Formula for Log Returns:
ln(sell_price / buy_price) = ln(sell_price) - ln (buy_price)
- Formula for Raw Profit:
Perform the following tasks in order:
- Calculate the raw profit, raw returns, and log returns for the entire period (i.e. buy at
t=0and sell att=4) - Demonstrate and explain how:
- The full-period raw profit relates to the additive and symmetrical properties of the individual raw profit from part (1).
- The full-period log return relates to the additive and symmetrical properties of the individual log returns from part (1).
- The full-period raw return relates to the lack of additive property of the individual raw returns from part (1).
- Calculate the raw profit, raw returns, and log returns for the entire period (i.e. buy at